package com.website.custom.service.impl;

import java.util.List;
import com.website.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.website.custom.mapper.WAboutMapper;
import com.website.custom.domain.WAbout;
import com.website.custom.service.IWAboutService;
import com.website.common.core.text.Convert;

/**
 * 关于我们Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-03
 */
@Service
public class WAboutServiceImpl implements IWAboutService 
{
    @Autowired
    private WAboutMapper wAboutMapper;

    /**
     * 查询关于我们
     * 
     * @param id 关于我们主键
     * @return 关于我们
     */
    @Override
    public WAbout selectWAboutById(Long id)
    {
        return wAboutMapper.selectWAboutById(id);
    }

    /**
     * 查询关于我们列表
     * 
     * @param wAbout 关于我们
     * @return 关于我们
     */
    @Override
    public List<WAbout> selectWAboutList(WAbout wAbout)
    {
        return wAboutMapper.selectWAboutList(wAbout);
    }

    /**
     * 新增关于我们
     * 
     * @param wAbout 关于我们
     * @return 结果
     */
    @Override
    public int insertWAbout(WAbout wAbout)
    {
        wAbout.setCreateTime(DateUtils.getNowDate());
        return wAboutMapper.insertWAbout(wAbout);
    }

    /**
     * 修改关于我们
     * 
     * @param wAbout 关于我们
     * @return 结果
     */
    @Override
    public int updateWAbout(WAbout wAbout)
    {
        wAbout.setUpdateTime(DateUtils.getNowDate());
        return wAboutMapper.updateWAbout(wAbout);
    }

    /**
     * 批量删除关于我们
     * 
     * @param ids 需要删除的关于我们主键
     * @return 结果
     */
    @Override
    public int deleteWAboutByIds(String ids)
    {
        return wAboutMapper.deleteWAboutByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除关于我们信息
     * 
     * @param id 关于我们主键
     * @return 结果
     */
    @Override
    public int deleteWAboutById(Long id)
    {
        return wAboutMapper.deleteWAboutById(id);
    }
}
